﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data.SqlClient;
using System.Text;
using System.Web;

using Common;

namespace MmCat.Inc
{
    /// <summary>
    /// GetAccount 的摘要说明
    /// </summary>
    public class GetAccount : IHttpHandler
    {

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            int rInt = 0;
            if (context.Request["act"].ToString() == "delUsed")
            {
                rInt = OledbHelper.ExecuteSql("delete from P_Used where id=" + context.Request["id"].ToString());
            }
            else if (context.Request["act"].ToString() == "delNews")
            {
                rInt = OledbHelper.ExecuteSql("delete from P_News where id=" + context.Request["id"].ToString());
            }
            else if (context.Request["act"].ToString() == "delShow")
            {
                rInt = OledbHelper.ExecuteSql("delete from P_Show where id=" + context.Request["id"].ToString());
            }
            else if (context.Request["act"].ToString() == "delService")
            {
                rInt = OledbHelper.ExecuteSql("delete from P_Service where id=" + context.Request["id"].ToString());
            }
            else if (context.Request["act"].ToString() == "old")
            {
                rInt = OledbHelper.ExecuteSql("delete from P_Used where id=" + context.Request["id"].ToString());
            }
            context.Response.Write(rInt);
        }

        public bool IsReusable
        {
            get
            {
                return false;
            }
        }
    }
}